<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
      xmlns:p="http://primefaces.org/ui">

<composite:interface>
    <!--  The default configuration-->
    <composite:attribute name="allowUnsorting" default="true"/>
    <composite:attribute name="ariaRowLabel"/>
    <composite:attribute name="binding" default="#{entityTableComponent}"/>
    <composite:attribute name="cellEditMode" default="eager"/>
    <composite:attribute name="cellSeparator"/>
    <composite:attribute name="clientCache" default="false"/>
    <composite:attribute name="currentPageReportTemplate"
                         default="#{msg['framework']['total']} {totalRecords}  #{msg['framework']['record']} ({currentPage} / {totalPages}) "/>
    <composite:attribute name="dataLocale"/>
    <composite:attribute name="dir" default="ltr"/>
    <composite:attribute name="disableContextMenuIfEmpty" default="false"/>
    <composite:attribute name="disabledSelection" default="false"/>
    <composite:attribute name="disabledTextSelection" default="false"/>
    <composite:attribute name="draggableColumns" default="false"/>
    <composite:attribute name="draggableRows" default="false"/>
    <composite:attribute name="draggableRowsFunction"/>
    <composite:attribute name="editInitEvent" default="dblclick"/>
    <composite:attribute name="editMode" default="cell"/>
    <composite:attribute name="editable" default="true"/>
    <composite:attribute name="editingRow" default="false"/>
    <composite:attribute name="emptyMessage" default="#{msg['framework']['noRecords']}"/>
    <composite:attribute name="escapeText" default="true"/>
    <composite:attribute name="expandedRow" default="false"/>
    <composite:attribute name="filterBy"/>
    <composite:attribute name="filterDelay" default="300"/>
    <composite:attribute name="filterEvent" default="enter"/>
    <composite:attribute name="filteredValue"/>
    <composite:attribute name="first" default="0"/>
    <composite:attribute name="frozenColumns" default="0"/>
    <composite:attribute name="frozenRows"/>
    <composite:attribute name="globalFilter"/>
    <composite:attribute name="globalFilterFunction"/>
    <composite:attribute name="id" default="dataTable"/>
    <composite:attribute name="lazy" default="false"/>
    <composite:attribute name="liveResize" default="false"/>
    <composite:attribute name="liveScroll" default="false"/>
    <composite:attribute name="liveScrollBuffer" default="0"/>
    <composite:attribute name="multiViewState" default="false"/>
    <composite:attribute name="nativeElements" default="false"/>
    <composite:attribute name="onExpandStart"/>
    <composite:attribute name="onRowClick"/>
    <composite:attribute name="pageLinks" default="10"/>
    <composite:attribute name="paginator" default="true"/>
    <composite:attribute name="paginatorAlwaysVisible" default="true"/>
    <composite:attribute name="paginatorPosition" default="bottom"/>
    <composite:attribute name="paginatorTemplate"
                         default="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"/>
    <composite:attribute name="reflow" default="true"/>
    <composite:attribute name="rendered" default="true"/>
    <composite:attribute name="renderEmptyFacets" default="false"/>
    <composite:attribute name="resizableColumns" default="false"/>
    <composite:attribute name="resizeMode" default="fit"/>
    <composite:attribute name="rowDragSelector" default="td,span:not(.ui-c)"/>
    <composite:attribute name="rowEditMode" default="eager"/>
    <composite:attribute name="rowExpandMode" default="single"/>
    <composite:attribute name="rowHover" default="true"/>
    <composite:attribute name="rowIndexVar" default="index"/>
    <composite:attribute name="rowKey" default="#{element.id}"/>
    <composite:attribute name="rowSelectMode" default="new"/>
    <composite:attribute name="rowSelector" default="#{element.id}"/>
    <composite:attribute name="rowStatePreserved" default="false"/>
    <composite:attribute name="rowStyleClass"/>
    <composite:attribute name="rows" default="20"/>
    <composite:attribute name="rowsPerPageLabel"/>
    <composite:attribute name="rowsPerPageTemplate" default="10, 20, 50, 100"/>
    <composite:attribute name="saveOnCellBlur" default="true"/>
    <composite:attribute name="scrollHeight" default="100%"/>
    <composite:attribute name="scrollRows" default="10"/>
    <composite:attribute name="scrollWidth" default="100%"/>
    <composite:attribute name="scrollable" default="false"/>
    <composite:attribute name="selectionMode" default="multiple"/>
    <composite:attribute name="selectionPageOnly" default="true"/>
    <composite:attribute name="showGridlines" default="false"/>
    <composite:attribute name="size" default="small"/>
    <composite:attribute name="sortMode" default="multiple"/>
    <composite:attribute name="sortBy"/>
    <composite:attribute name="skipChildren" default="false"/>
    <composite:attribute name="stickyHeader" default="false"/>
    <composite:attribute name="stickyTopAt"/>
    <composite:attribute name="stripedRows" default="true"/>
    <composite:attribute name="style"/>
    <composite:attribute name="styleClass" default=""/>
    <composite:attribute name="summary"/>
    <composite:attribute name="tabindex"/>
    <composite:attribute name="tableStyle"/>
    <composite:attribute name="tableStyleClass"/>
    <composite:attribute name="value"/>
    <composite:attribute name="var" default="element"/>
    <composite:attribute name="virtualScroll" default="false"/>
    <composite:attribute name="widgetVar"
                         default="#{cc.clientId.replace(':','')}_dataTable"/>
    <composite:attribute name="touchable" default="true"/>

    <!-- coustom attrs-->
    <composite:attribute name="formDialogId" default=""/>
    <composite:attribute name="dialogWidgetVar" default="#{cc.attrs.formDialogId}_dialog"/>
    <composite:attribute name="singleSelection"/>
    <composite:attribute name="multipleSelection" type="java.util.List"/>
    <composite:attribute name="filterable" default="false"/>
    <composite:attribute name="access"/>

    <!-- toolbar -->
    <composite:attribute name="enabledToolbar" default="true"/>
    <composite:attribute name="headText" default="#{null}"/>
    <composite:attribute name="toolbarStickyMargin" default="50"/>
    <composite:attribute name="toolbarStickySupported" default="false"/>

    <composite:attribute name="uploadSupported" default="true"/>
    <composite:attribute name="exportSupported" default="true"/>
    <composite:attribute name="exportFileName" default="data"/>
    <composite:attribute name="exportPostProcessor" method-signature="void exportPostProcessor(java.lang.Object)"
                         default="#{controller.exportPostProcessor}"/>
    <composite:attribute name="exportPreProcessor" method-signature="void exportPostProcessor(java.lang.Object)"
                         default="#{controller.exportPreProcessor}"/>
    <composite:attribute name="exportOptions" default="#{null}"/>
    <!-- row操作按钮-->
    <composite:attribute name="optionsSupport" default="true"/>
    <composite:attribute name="optionsWidth" default="100"/>

    <!--  add操作按钮-->
    <composite:attribute name="addTitle" default="#{msg['framework']['add']}"/>
    <composite:attribute name="addSupported" default="true"/>
    <composite:attribute name="addMethod" method-signature="void add()" default="#{controller.add}"/>
    <composite:attribute name="addUpdate" default=""/>
    <composite:attribute name="addOncomplete"
                         default="if(!args.isExpired){PF('#{cc.attrs.dialogWidgetVar}').show();}"/>

    <!--  edit 操作按钮-->
    <composite:attribute name="editTitle" default="#{msg['framework']['edit']}"/>
    <composite:attribute name="editSupported" default="true"/>
    <composite:attribute name="editDisabled" default="false"/>
    <composite:attribute name="editMethod" method-signature="void edit()" default="#{controller.edit}"/>
    <composite:attribute name="editUpdate" default="@widgetVar(#{cc.attrs.dialogWidgetVar})"/>
    <composite:attribute name="editOncomplete"
                         default="if(!args.isExpired){PF('#{cc.attrs.dialogWidgetVar}').show();}"/>

    <!--  delete操作按钮-->
    <composite:attribute name="deleteTitle" default="#{msg['framework']['delete']}"/>
    <composite:attribute name="deleteSupported" default="true"/>
    <composite:attribute name="deleteDisabled" default="false"/>
    <composite:attribute name="deleteMethod" method-signature="void delete()" default="#{controller.delete}"/>
    <composite:attribute name="deleteUpdate" default="@form"/>
    <composite:attribute name="deleteOncomplete" default=""/>

    <!--  refresh操作按钮-->
    <composite:attribute name="refreshSupported" default="true"/>
    <composite:attribute name="refreshMethod" method-signature="void onEntry()" default="#{controller.onEntry}"/>
    <composite:attribute name="refreshUpdate" default="#{cc.attrs.id}:dataTable"/>
    <composite:attribute name="refreshOncomplete" default=""/>


    <!--  facet -->
    <composite:facet name="footer"/>
    <composite:facet name="options"/>
    <composite:facet name="toolbar"/>

    <!--  event -->
    <composite:clientBehavior name="page" targets="#{cc.attrs.id}:entityDataTable" event="page"/>
    <composite:clientBehavior name="sort" targets="#{cc.attrs.id}:entityDataTable" event="sort"/>
    <composite:clientBehavior name="filter" targets="#{cc.attrs.id}:entityDataTable" event="filter"/>
    <composite:clientBehavior name="rowSelect" targets="#{cc.attrs.id}:entityDataTable" event="rowSelect"/>
    <composite:clientBehavior name="rowUnselect" targets="#{cc.attrs.id}:entityDataTable" event="rowUnselect"/>
    <composite:clientBehavior name="rowEdit" targets="#{cc.attrs.id}:entityDataTable" event="rowEdit"/>
    <composite:clientBehavior name="rowEditInit" targets="#{cc.attrs.id}:entityDataTable" event="rowEditInit"/>
    <composite:clientBehavior name="rowEditCancel" targets="#{cc.attrs.id}:entityDataTable" event="rowEditCancel"/>
    <composite:clientBehavior name="colResize" targets="#{cc.attrs.id}:entityDataTable" event="colResize"/>
    <composite:clientBehavior name="toggleSelect" targets="#{cc.attrs.id}:entityDataTable" event="toggleSelect"/>
    <composite:clientBehavior name="colReorder" targets="#{cc.attrs.id}:entityDataTable" event="colReorder"/>
    <composite:clientBehavior name="rowSelectRadio" targets="#{cc.attrs.id}:entityDataTable" event="rowSelectRadio"/>
    <composite:clientBehavior name="rowSelectCheckbox" targets="#{cc.attrs.id}:entityDataTable" event="rowSelectCheckbox"/>
    <composite:clientBehavior name="rowUnselectCheckbox" targets="#{cc.attrs.id}:entityDataTable"
                              event="rowUnselectCheckbox"/>
    <composite:clientBehavior name="rowDblselect" targets="#{cc.attrs.id}:entityDataTable" event="rowDblselect"/>
    <composite:clientBehavior name="rowToggle" targets="#{cc.attrs.id}:entityDataTable" event="rowToggle"/>
    <composite:clientBehavior name="contextMenu" targets="#{cc.attrs.id}:entityDataTable" event="contextMenu"/>
    <composite:clientBehavior name="cellEdit" targets="#{cc.attrs.id}:entityDataTable" event="cellEdit"/>
    <composite:clientBehavior name="cellEditInit" targets="#{cc.attrs.id}:entityDataTable" event="cellEditInit"/>
    <composite:clientBehavior name="cellEditCancel" targets="#{cc.attrs.id}:entityDataTable" event="cellEditCancel"/>
    <composite:clientBehavior name="rowReorder" targets="#{cc.attrs.id}:entityDataTable" event="rowReorder"/>


</composite:interface>

<composite:implementation>
    <h:outputScript>
        String.prototype.format = function () {
        if (arguments.length == 0) return this;
        for (var s = this, i = 0; i &lt; arguments.length; i++) {
        s = s.replace(new RegExp("\\{" + i + "\\}", "g"), arguments[i]);
        }
        return s;
        };

        $(function () {

        $("[id^='#{cc.attrs.id}'][id$='_head_checkbox']").on('click', function(){
        #{cc.attrs.onRowClick}
        });

        const targetNode = $("[id^='#{cc.attrs.id}'][id$='_checkbox']")
        const config = {attributes: true};
        const callback = function () {
        const count = PF('#{cc.attrs.widgetVar}').getSelectedRowsCount();
        let msg = "#{msg['framework']['selectedRecord']}"
        let delBtnVar = PF('#{cc.attrs.widgetVar}_deleteBtn')
        if (!delBtnVar) {
        return false;
        }
        let delText = delBtnVar.jq.find('.ui-button-text').text().split(" ")[0]
        if (count) {
        PF('#{cc.attrs.widgetVar}_deleteBtn').enable()
        PF('#{cc.attrs.widgetVar}_deleteBtn').jq.find('.ui-button-text').text(delText + " " + msg.format(count))
        } else {
        PF('#{cc.attrs.widgetVar}_deleteBtn').disable()
        PF('#{cc.attrs.widgetVar}_deleteBtn').jq.find('.ui-button-text').text(delText)
        }
        }
        const observer = new MutationObserver(callback);
        for (let i = 0; i &lt; targetNode.length; i++) {
        observer.observe(targetNode[i], config);
        }
        })
    </h:outputScript>
    <h:outputStylesheet name="/css/common.css" library="framework"/>
    <p:sticky target="entityToolbar" rendered="#{cc.attrs.toolbarStickySupported}"
              margin="#{cc.attrs.toolbarStickyMargin}"/>
    <p:tooltip trackMouse="true"/>
    <p:outputPanel id="dataTable" class="grid entity-table">
        <div class="col-12">
            <div class="card">
                <p:toolbar id="entityToolbar" styleClass="mb-4" rendered="#{cc.attrs.enabledToolbar}">
                    <p:toolbarGroup>
                        <p:commandButton id="addBtn" widgetVar="#{cc.attrs.widgetVar}_addBtn" icon="pi pi-plus"
                                         styleClass="ui-button-success"
                                         style="margin-right: .5rem"
                                         value="#{cc.attrs.addTitle}"
                                         rendered="#{cc.attrs.addSupported}"
                                         action="#{cc.attrs.addMethod}"
                                         update="@widgetVar(#{cc.attrs.dialogWidgetVar}), #{cc.attrs.addUpdate}"
                                         oncomplete="#{cc.attrs.addOncomplete}"/>
                        <p:commandButton id="deleteBtn" widgetVar="#{cc.attrs.widgetVar}_deleteBtn" icon="pi pi-trash"
                                         styleClass="ui-button-danger p-mr-2" disabled="true"
                                         value="#{cc.attrs.deleteTitle}"
                                         rendered="#{cc.attrs.deleteSupported}"
                                         onclick="PF('#{cc.attrs.widgetVar}_delete_tips').show()"/>

                        <composite:renderFacet name="toolbar"/>
                    </p:toolbarGroup>
                    <p:toolbarGroup align="right">
                        <p:fileUpload mode="simple" skinSimple="true" label="#{msg['framework']['import']}"
                                      chooseIcon="pi pi-upload" rendered="#{cc.attrs.uploadSupported}"/>
                        <p:commandButton value="#{msg['framework']['export']}" icon="pi pi-download"
                                         styleClass="ui-button-help"
                                         ajax="false" rendered="#{cc.attrs.exportSupported}">
                            <p:dataExporter type="xls" target="entityDataTable" fileName="#{cc.attrs.exportFileName}"
                                            postProcessor="#{cc.attrs.exportPostProcessor}"
                                            preProcessor="#{cc.attrs.exportPreProcessor}"
                                            options="#{cc.attrs.exportOptions}"/>
                        </p:commandButton>
                    </p:toolbarGroup>
                </p:toolbar>

                <p:dataTable id="entityDataTable"
                             allowUnsorting="#{cc.attrs.allowUnsorting}"
                             ariaRowLabel="#{cc.attrs.ariaRowLabel}"
                             binding="#{cc.attrs.binding}"
                             cellEditMode="#{cc.attrs.cellEditMode}"
                             cellSeparator="#{cc.attrs.cellSeparator}"
                             clientCache="#{cc.attrs.clientCache}"
                             currentPageReportTemplate="#{cc.attrs.currentPageReportTemplate}"
                             dataLocale="#{cc.attrs.dataLocale}"
                             dir="#{cc.attrs.dir}"
                             disableContextMenuIfEmpty="#{cc.attrs.disableContextMenuIfEmpty}"
                             disabledSelection="#{cc.attrs.disabledSelection}"
                             disabledTextSelection="#{cc.attrs.disabledTextSelection}"
                             draggableColumns="#{cc.attrs.draggableColumns}"
                             draggableRows="#{cc.attrs.draggableRows}"
                             editInitEvent="#{cc.attrs.editInitEvent}"
                             editMode="#{cc.attrs.editMode}"
                             editable="#{cc.attrs.editable}"
                             editingRow="#{cc.attrs.editingRow}"
                             emptyMessage="#{cc.attrs.emptyMessage}"
                             escapeText="#{cc.attrs.escapeText}"
                             expandedRow="#{cc.attrs.expandedRow}"
                             filterEvent="#{cc.attrs.filterEvent}"
                             filterBy="#{cc.attrs.filterBy}"
                             filterDelay="#{cc.attrs.filterDelay}"
                             filteredValue="#{cc.attrs.filteredValue}"
                             first="#{cc.attrs.first}"
                             frozenColumns="#{cc.attrs.frozenColumns}"
                             frozenRows="#{cc.attrs.frozenRows}"
                             lazy="#{cc.attrs.lazy}"
                             liveResize="#{cc.attrs.liveResize}"
                             liveScroll="#{cc.attrs.liveScroll}"
                             liveScrollBuffer="#{cc.attrs.liveScrollBuffer}"
                             multiViewState="#{cc.attrs.multiViewState}"
                             nativeElements="#{cc.attrs.nativeElements}"
                             onExpandStart="#{cc.attrs.onExpandStart}"
                             onRowClick="#{cc.attrs.onRowClick}"
                             pageLinks="#{cc.attrs.pageLinks}"
                             paginator="#{cc.attrs.paginator}"
                             paginatorAlwaysVisible="#{cc.attrs.paginatorAlwaysVisible}"
                             paginatorPosition="#{cc.attrs.paginatorPosition}"
                             paginatorTemplate="#{cc.attrs.paginatorTemplate}"
                             reflow="#{cc.attrs.reflow}"
                             rendered="#{cc.attrs.rendered}"
                             renderEmptyFacets="#{cc.attrs.renderEmptyFacets}"
                             resizableColumns="#{cc.attrs.resizableColumns}"
                             resizeMode="#{cc.attrs.resizeMode}"
                             rowDragSelector="#{cc.attrs.rowDragSelector}"
                             rowEditMode="#{cc.attrs.rowEditMode}"
                             rowExpandMode="#{cc.attrs.rowExpandMode}"
                             rowHover="#{cc.attrs.rowHover}"
                             rowIndexVar="#{cc.attrs.rowIndexVar}"
                             rowKey="#{cc.attrs.rowKey}"
                             rowSelectMode="#{cc.attrs.rowSelectMode}"
                             rowSelector="#{cc.attrs.rowSelector}"
                             rowStatePreserved="#{cc.attrs.rowStatePreserved}"
                             rowStyleClass="#{cc.attrs.rowStyleClass}"
                             rows="#{cc.attrs.rows}"
                             rowsPerPageLabel="#{cc.attrs.rowsPerPageLabel}"
                             rowsPerPageTemplate="#{cc.attrs.rowsPerPageTemplate}"
                             saveOnCellBlur="#{cc.attrs.saveOnCellBlur}"
                             scrollHeight="#{cc.attrs.scrollHeight}"
                             scrollRows="#{cc.attrs.scrollRows}"
                             scrollWidth="#{cc.attrs.scrollWidth}"
                             scrollable="#{cc.attrs.scrollable}"
                             selection="#{cc.attrs.multipleSelection}"
                             selectionPageOnly="#{cc.attrs.selectionPageOnly}"
                             showGridlines="#{cc.attrs.showGridlines}"
                             size="#{cc.attrs.size}"
                             sortMode="#{cc.attrs.sortMode}"
                             sortBy="#{cc.attrs.sortBy}"
                             skipChildren="#{cc.attrs.skipChildren}"
                             stickyHeader="#{cc.attrs.stickyHeader}"
                             stickyTopAt="#{cc.attrs.stickyTopAt}"
                             stripedRows="#{cc.attrs.stripedRows}"
                             style="#{cc.attrs.style}"
                             styleClass="#{cc.attrs.styleClass} #{cc.attrs.widgetVar} content"
                             summary="#{cc.attrs.summary}"
                             tabindex="#{cc.attrs.tabindex}"
                             tableStyle="#{cc.attrs.tableStyle}"
                             tableStyleClass="#{cc.attrs.tableStyleClass}"
                             value="#{cc.attrs.value}"
                             virtualScroll="#{cc.attrs.virtualScroll}"
                             widgetVar="#{cc.attrs.widgetVar}"
                             touchable="#{cc.attrs.touchable}"
                             globalFilter="#{cc.attrs.globalFilter}"
                             var="element">

                    <c:set target="#{component}" property="globalFilterFunction"
                           value="#{cc.attrs.globalFilterFunction}"/>
                    <c:set target="#{component}" property="draggableRowsFunction"
                           value="#{cc.attrs.draggableRowsFunction}"/>

                    <f:facet name="header">
                        <div class="entity-table-header">
                            <span style="font-weight: bold">#{cc.attrs.headText}</span>

                            <p:outputPanel layout="inline"
                                           styleClass="filter-container ui-input-icon-left ui-inputgroup">
                                <p:inputText id="globalFilter" style="width:150px" rendered="#{cc.attrs.filterable}"
                                             placeholder="#{msg['framework']['enterKeyword']}"/>
                                <p:commandButton id="searchBtn" type="button" icon="fa fa-search"
                                                 rendered="#{cc.attrs.filterable}"
                                                 onclick="PF('#{cc.attrs.widgetVar}').filter()"/>

                                <p:button id="refreshBtn" widgetVar="refreshBtn" icon="pi pi-refresh"
                                          onclick="PF('#{cc.attrs.widgetVar}').unselectAllRows();"
                                          oncomplete="#{cc.attrs.refreshOncomplete}"/>
                                <p:commandButton id="toggler" type="button" icon="pi pi-align-justify"/>
                                <p:columnToggler id="columnToggler" datasource="entityDataTable" trigger="toggler"/>
                            </p:outputPanel>
                        </div>
                    </f:facet>

                    <p:column selectionMode="#{cc.attrs.selectionMode}" width="20" exportable="false"
                              toggleable="false"/>

                    <composite:insertChildren/>


                    <p:column toggleable="false" exportable="false" width="80"
                              rendered="#{cc.attrs.optionsSupport}" styleClass="options-class">
                        <p:commandButton id="editBtn" icon="pi pi-pencil" process="@this"
                                         styleClass="edit-button rounded-button ui-button-success p-mr-2"
                                         async="true"
                                         pt:data-tooltip="#{cc.attrs.editTitle}"
                                         rendered="#{cc.attrs.editSupported}"
                                         disabled="#{cc.attrs.editDisabled}"
                                         action="#{cc.attrs.editMethod}"
                                         update="#{cc.attrs.editUpdate}"
                                         oncomplete="#{cc.attrs.editOncomplete}">
                            <f:setPropertyActionListener value="#{element}" target="#{cc.attrs.singleSelection}"/>
                        </p:commandButton>

                        <p:commandButton id="delBtn" icon="pi pi-trash" process="@this"
                                         styleClass="delete-button ui-button-warning rounded-button p-mr-2"
                                         async="true"
                                         pt:data-tooltip="#{cc.attrs.deleteTitle}"
                                         oncomplete="PF('#{cc.attrs.widgetVar}_delete_tips').show()"
                                         rendered="#{cc.attrs.deleteSupported}">
                            <f:setPropertyActionListener value="#{element}" target="#{cc.attrs.singleSelection}"/>
                        </p:commandButton>
                    </p:column>
                </p:dataTable>
                <p:confirmDialog id="#{cc.attrs.widgetVar}_delete_tip" widgetVar="#{cc.attrs.widgetVar}_delete_tips"
                                 rendered="#{cc.attrs.deleteSupported}" severity="warn"
                                 header="#{msg['framework']['message']}"
                                 message="#{msg['framework']['confirmDeletion']}"
                                 showEffect="fade" hideEffect="fade" width="400">
                    <p:commandButton
                            id="deleteButton" styleClass="ui-confirmdialog-yes" icon="pi pi-check"
                            value="#{msg['framework']['confirm']}" process="@form"
                            rendered="#{cc.attrs.deleteSupported}"
                            action="#{cc.attrs.deleteMethod}"
                            update="#{cc.attrs.deleteUpdate}"
                            oncomplete="PF('#{cc.attrs.widgetVar}_delete_tips').hide(); PF('#{cc.attrs.widgetVar}').unselectAllRows(); #{cc.attrs.deleteOncomplete}">
                    </p:commandButton>
                    <p:commandButton value="#{msg['framework']['cancel']}" type="button"
                                     styleClass="ui-confirmdialog-no ui-button-secondary" icon="pi pi-times"
                                     onclick="PF('#{cc.attrs.widgetVar}_delete_tips').hide()"/>
                </p:confirmDialog>
            </div>
        </div>
    </p:outputPanel>

</composite:implementation>
</html>
